package com.zkzx.driver.client;

import com.zkzx.common.driver.command.DriverCommand;
import com.zkzx.common.driver.param.DriverInvitationParam;
import com.zkzx.common.driver.param.DriverThreeElementsParam;
import com.zkzx.common.driver.model.DriverVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;


/**
 * 北京中科智兴物联科技有限公司 @版权所有
 *
 * @Author: zhaoyihe@zkraising.com
 * @Date: 2021/05/21/17:32
 * @Description:
 */
@FeignClient(value = "ZKZX-WLHY-ADAPTOR") // 本地调用 先以接口地址为准进行调用
//@FeignClient(name = "ZKZX-WLHY-ADAPTOR",url = "http://localhost:28084")
public interface WhAdaptorClient {


    @GetMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}")
    DriverCommand getDriver(@PathVariable("id")Integer id, @RequestParam("name") String name, @RequestParam("code") String  idCard);

    @PostMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}")
    DriverCommand add(@PathVariable("id") Integer id, @RequestBody @Valid DriverVO driverVO, @RequestParam("captcha") String  captcha, @RequestParam("identityKey") String  identityKey);

    @GetMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}/status")
    DriverCommand  getStatus(@PathVariable("id")Integer id,@RequestParam("three_id") String  threeId);

    @PostMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}/three_elements")
    DriverCommand getIdentityKey(@PathVariable("id")Integer id,@RequestBody @Valid DriverThreeElementsParam driverThreeElementsParam);

    @PostMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}/contract_sign")
    DriverCommand getContractSign(@PathVariable("id")Integer id,@RequestBody @Valid DriverInvitationParam driverInvitationParam);

    @GetMapping("/ZKZX-WLHY-ADAPTOR/drivers/{id}/contract_status")
    DriverCommand getContractStatus(@PathVariable("id")Integer id,@RequestParam("contract_num")String contractNum,@RequestParam("mobile") String  mobile);


}

